setTimeout(orderid(),100);

function orderid(){
	
		var orderid=window.location.href.split("?")[1].split("=")[1];
		$.ajax({
			url:"http://localhost:16111/orderform/orderxq",
			mimeType: "post",
			dataType: "json",
			data:{orderid:orderid},
			xhrFields:{withCredentials: true},
			success:function(date){
				$.each(date,function(k,v){
					if(k=="addressinformation"){
						document.getElementById("addressinformation").innerHTML=v;
					}
					if(k=="ordernumber"){
						document.getElementById("ordernumber").innerHTML=v;
						localStorage.setItem("ordernumber",ordernumber);
					}
					if(k=="undertime"){
						var time=new Date(v);
						var time2=time.getFullYear()+"-"+time.getMonth()+"-"+time.getDay()+"&nbsp;&nbsp;"+time.getHours()+":"+time.getMinutes()+":"+time.getSeconds();
						document.getElementById("undertime").innerHTML=time2;
					}
					if(k=="paytime"){
						var time=new Date(v);
						var time2=time.getFullYear()+"-"+time.getMonth()+"-"+time.getDay()+"&nbsp;&nbsp;"+time.getHours()+":"+time.getMinutes()+":"+time.getSeconds();
						document.getElementById("paytime").innerHTML=time2;
					}
					if(k=="deliverytime"){
						var time=new Date(v);
						var time2=time.getFullYear()+"-"+time.getMonth()+"-"+time.getDay()+"&nbsp;&nbsp;"+time.getHours()+":"+time.getMinutes()+":"+time.getSeconds();
						document.getElementById("deliverytime").innerHTML=time2;
					}
					if(k=="comitydescription"){
						document.getElementById("comitydescription").innerHTML=v;
					}
					if(k=="specifications"){
						document.getElementById("specifications").innerHTML=v;
					}
					if(k=="specifications2"){
						document.getElementById("specifications2").innerHTML=v;
					}
					if(k=="orderstatus"){
						document.getElementById("orderstatus").innerHTML=v;
					}
					
					if(k=="comitynumber"){
						document.getElementById("comitynumber").innerHTML=v;
					}
					if(k=="comityprices"){
						document.getElementById("comityprices").innerHTML=v;
					}
					if(k=="preferentialinformation"){
						document.getElementById("preferentialinformation").innerHTML=v;
					}
					if(k=="settlementprice"){
						document.getElementById("settlementprice").innerHTML=v;
					}
					if(k=="freight"){
						document.getElementById("freight").innerHTML=v;
					}
					if(k=="actualpayment"){
						document.getElementById("actualpayment").innerHTML=v;
					}
				});
			}
		});
	}
	
	function shouhuogai(){
		var orderid=window.location.href.split("?")[1].split("=")[1];
		alert("收货成功");
		$.ajax({
			url:"http://localhost:16111/orderform/shuohuogai",
			mimeType: "post",
			dataType: "json",
			data:{orderid:orderid},
			xhrFields:{withCredentials: true},
			success: function(date) {
				alert("收货成功");
				location="udai_order.html";
			},
			error: function(text) {
				var json = eval(text);
				
				
			}
		})
	}